package net.wexoo.onlinedivelog.entity.diveGuide;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.wexoo.onlinedivelog.entity.dive.DiveBean;
import net.wexoo.onlinedivelog.entity.diveLevel.DiveLevelBean;
import net.wexoo.onlinedivelog.entity.person.PersonBean;

/**
 * @author wexoo
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "DIVE_GUIDE")
@PrimaryKeyJoinColumn(name = "PERSON")
public class DiveGuideBean extends PersonBean {

	private static final long serialVersionUID = 1L;

	@Column(name = "CURRENT_DIVING_SCHOOL")
	private String currentDivingSchool;

	public DiveGuideBean(PersonBean personBean) {
		super(personBean.getDiveLevel(), personBean.getLogin(), personBean.getPassword(), personBean.getForename(),
				personBean.getSurname(), personBean.getEmail());
	}

	public DiveGuideBean(DiveLevelBean diveLevel, List<DiveBean> ledDives, String login, String password,
			String forename, String surname, String email, String currentDivingSchool) {
		this.currentDivingSchool = currentDivingSchool;
	}
}